package com.inctech.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.inctech.dao.IEmployeeDao;
import com.inctech.model.Employee;
import com.inctech.service.IEmployeeService;

@Service("employeeService")
public class EmployeeServiceImpl implements IEmployeeService {
	
	@Autowired
	private IEmployeeDao employeeDao;

	@Override
	public int getTocalCount() {
		return employeeDao.getTocal();
	}

	@Override
	public List<Employee> findAllEmployee(Map<String, Object> paramMap) {
		return employeeDao.findAll(paramMap);
	}

	@Override
	public int addEmployee(Map<String, Object> paramMap) {
		return employeeDao.add(paramMap);
	}

	@Override
	public int updateEmployee(Map<String, Object> paramMap) {
		return employeeDao.update(paramMap);
	}

	@Override
	public int deleteEmployee(int id) {
		return employeeDao.delete(id);
	}

	@Override
	public List<String> getAllDepartment() {
		return employeeDao.getAllDepartment();
	}

	@Override
	public List<String> getPositionByDep(String department) {
		return employeeDao.getPositionByDep(department);
	}

	@Override
	public int updateEmployeeJob(Map<String, Object> paramMap) {
		return employeeDao.updateEmployeeJob(paramMap);
	}
	

}
